-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add date format to exported logs #71
Add date format to exported logs #71
Conversation
And make them same as in logs list
@@ -21,6 +22,8 @@ internal class SentinelFileTree( | |||
private val logFileResolver = LogFileResolver(context) | |||
|
|||
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) { | |||
val dateTimeFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss. SSSZ", Locale.getDefault()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm interpreting the screenshot correctly, this space seems unnecessary.
val dateTimeFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss. SSSZ", Locale.getDefault()) | |
val dateTimeFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.getDefault()) |
|
||
internal class LoggerAdapter( | ||
private val onListChanged: (Boolean) -> Unit, | ||
private val onClick: (SentinelFileTree.Entry) -> Unit | ||
) : ListAdapter<SentinelFileTree.Entry, LoggerViewHolder>(LoggerDiffUtil()) { | ||
|
||
private val dateTimeFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss. SSSZ", Locale.getDefault()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too, and it also makes me wonder if we could just share this pattern or formatted between the two files 😄
private val dateTimeFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss. SSSZ", Locale.getDefault()) | |
private val dateTimeFormat = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ", Locale.getDefault()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, of course
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me, but best if someone with more knowledge of the library code looks into it as well. Nice to see this improvement! 👏
…date-in-exported-logs
Quality Gate passedIssues Measures |
📷 Screenshots
📄 Context
As requested in #47 exported logs now have human-readable timestamp (same format as logcat). Also, to have the consistency I added same date-time format to the list of logs (and log files)
📝 Changes
Added date-time formating when writing logs to files. Changed date-time formatting in list of logs
🛠️ How to test
Try out sample app